# 保存发送短信的异步任务
from go_shopping.libs.yuntongxun.sms import CCP
from celery_tasks.main import app


# 处理发送短信验证码的业务逻辑，name异步任务的名字
@app.task(name='send_sms_code')
def send_sms_code(mobile, sms_code):
    ccp = CCP()
    ccp.send_template_sms(mobile, [sms_code, '5'], 1)  # 手机号-（短信验证码，时间）-模板


@app.task(name="xiaoding")
def a_print():
    print(111)
